package com.usian.user.controller;

import com.usian.model.common.dtos.ResponseResult;
import com.usian.model.user.dtos.LoginDto;
import com.usian.model.user.dtos.UserRelationDto;
import com.usian.user.service.ApUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/user")
public class ApUserController {
    @Autowired
    ApUserService service;
    @PostMapping("/login")
    public ResponseResult login(@RequestBody LoginDto dto){
        return service.login(dto);
    }
    @PostMapping("/follow")
    public ResponseResult follow(@RequestBody UserRelationDto dto){
        return service.follow(dto);
    }
}
